package com.young.core.domain;


import com.young.core.enums.JobStrategyEnum;

import java.io.Serializable;
import java.util.Date;

/**
 * 任务表，核心表
 */
public class JobDO implements Serializable {

    private int id;

    private String name;

    private String project;

    /**
     * 唯一码，对于java服务而言：
     * 1）旧版java客户端会使用此值解析获得clazz + method
     * 2）新版java客户端已不再使用此值，因为clazz + method属性将会直接发给客户端。
     *
     * 对于其他语言，此值将有重要意义，他将作为任务的标志信息在客户端用来对应http接口、invoker等。
     * 比如GO语言，每个uniqueCode
     */
    private String uniqueCode;

    /**
     * JAVA语言，目标类的方法，反射机制调用
     */
    private String method;

    /**
     * JAVA语言，目标类的类名，反射机制调用
     */
    private String clazz;

    /**
     * cronTab表达式
     */
    private String expression;

    /**
     * 回传数据，即当任务触发时，由trigger调用client时传递的数据
     * data需要精简，可以用来标记一些数据状态。
     */
    private String data;

    /**
     * 自定义执行节点列表，适用于临时测试，节点之间空格分割
     * 自定义节点 与group，只能有一个支持
     */
    private String customNodes;

    private Integer port;

    /**
     * 选择的节点分组
     */
    private String group;

    /**
     * 任务执行策略
     * @see JobStrategyEnum
     */
    private int strategy;

    /**
     *
     * 启动状态
     * 1 --> 启动
     * 0 --> 停止
     */
    private int status;

    /**
     * 操作者，任何数据操作，都会将当前操作者记录下来
     */
    private String operator;

    /**
     * 备注，可以为jiraId，审批的特别描述
     */
    private String comment;

    /**
     * 修改时，选定的审批者
     */
    private String auditor;

    private String description;

    private Date createTime;

    private Date updateTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getProject() {
        return project;
    }

    public void setProject(String project) {
        this.project = project;
    }

    public String getUniqueCode() {
        return uniqueCode;
    }

    public void setUniqueCode(String uniqueCode) {
        this.uniqueCode = uniqueCode;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public String getClazz() {
        return clazz;
    }

    public void setClazz(String clazz) {
        this.clazz = clazz;
    }

    public String getExpression() {
        return expression;
    }

    public void setExpression(String expression) {
        this.expression = expression;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getCustomNodes() {
        return customNodes;
    }

    public void setCustomNodes(String customNodes) {
        this.customNodes = customNodes;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public String getGroup() {
        return group;
    }

    public void setGroup(String group) {
        this.group = group;
    }

    public int getStrategy() {
        return strategy;
    }

    public void setStrategy(int strategy) {
        this.strategy = strategy;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getAuditor() {
        return auditor;
    }

    public void setAuditor(String auditor) {
        this.auditor = auditor;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
